package com.bestow.basic.service.impl;

import java.util.List;
import com.bestow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestow.basic.mapper.HlsDocumentCategoryMapper;
import com.bestow.basic.domain.HlsDocumentCategory;
import com.bestow.basic.service.IHlsDocumentCategoryService;

/**
 * 租赁单据类别Service业务层处理
 * 
 * @author liliu
 * @date 2022-09-02
 */
@Service
public class HlsDocumentCategoryServiceImpl implements IHlsDocumentCategoryService 
{
    @Autowired
    private HlsDocumentCategoryMapper hlsDocumentCategoryMapper;

    /**
     * 查询租赁单据类别
     * 
     * @param documentCategory 租赁单据类别主键
     * @return 租赁单据类别
     */
    @Override
    public HlsDocumentCategory selectHlsDocumentCategoryByDocumentCategory(String documentCategory)
    {
        return hlsDocumentCategoryMapper.selectHlsDocumentCategoryByDocumentCategory(documentCategory);
    }

    /**
     * 查询租赁单据类别列表
     * 
     * @param hlsDocumentCategory 租赁单据类别
     * @return 租赁单据类别
     */
    @Override
    public List<HlsDocumentCategory> selectHlsDocumentCategoryList(HlsDocumentCategory hlsDocumentCategory)
    {
        return hlsDocumentCategoryMapper.selectHlsDocumentCategoryList(hlsDocumentCategory);
    }

    /**
     * 新增租赁单据类别
     * 
     * @param hlsDocumentCategory 租赁单据类别
     * @return 结果
     */
    @Override
    public int insertHlsDocumentCategory(HlsDocumentCategory hlsDocumentCategory)
    {
        hlsDocumentCategory.setCreateTime(DateUtils.getNowDate());
        return hlsDocumentCategoryMapper.insertHlsDocumentCategory(hlsDocumentCategory);
    }

    /**
     * 修改租赁单据类别
     * 
     * @param hlsDocumentCategory 租赁单据类别
     * @return 结果
     */
    @Override
    public int updateHlsDocumentCategory(HlsDocumentCategory hlsDocumentCategory)
    {
        hlsDocumentCategory.setUpdateTime(DateUtils.getNowDate());
        return hlsDocumentCategoryMapper.updateHlsDocumentCategory(hlsDocumentCategory);
    }

    /**
     * 批量删除租赁单据类别
     * 
     * @param documentCategorys 需要删除的租赁单据类别主键
     * @return 结果
     */
    @Override
    public int deleteHlsDocumentCategoryByDocumentCategorys(String[] documentCategorys)
    {
        return hlsDocumentCategoryMapper.deleteHlsDocumentCategoryByDocumentCategorys(documentCategorys);
    }

    /**
     * 删除租赁单据类别信息
     * 
     * @param documentCategory 租赁单据类别主键
     * @return 结果
     */
    @Override
    public int deleteHlsDocumentCategoryByDocumentCategory(String documentCategory)
    {
        return hlsDocumentCategoryMapper.deleteHlsDocumentCategoryByDocumentCategory(documentCategory);
    }
}
